import request from '@/axios'
export const PATH_URL = import.meta.env.VITE_APP_SERVER
// 获取所有字典
export const getDictApi = () => {
  return request.get({ url: '/mock/dict/list' })
}

// 模拟获取某个字典
export const getDictOneApi = async () => {
  return request.get({ url: '/mock/dict/one' })
}


/**
 * 根据接口前缀查询出对应字段类型 及其对应字典数据
 */
export const findDictTypeList = async (params) => {
  return request.get({ url: PATH_URL +'/dictDate/findDictTypeList',params })
}

/**
 * 品牌及其型号关联字典关系查询
 */
export const findDictBrand = async (params) => {
  return request.get({ url: PATH_URL +'/dictDate/findDictBrand', params})
}

/**
 * 文件上传接口
 */
export const securityToken = async () => {
  return request.get({ url: PATH_URL +'/aliyunOss/getSecurityToken'})
}